#!/bin/sh

#    This file is part of Ec2-on-Rails.
#    http://code.google.com/p/ec2-on-rails/
#
#    Copyright 2007 Paul Dowman, http://pauldowman.com/
#
#    Ec2-on-Rails is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    Ec2-on-Rails is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program.  If not, see <http://www.gnu.org/licenses/>.

function make_dir() {
  mkdir $1
  if [ $2 ] ; then
    chown $2 $1
  fi
}

make_dir /tmp

make_dir /mnt/app app:app

make_dir /mnt/backup app:app

make_dir /mnt/log
make_dir /mnt/log/apache2 www-data:www-data
make_dir /mnt/log/fsck
make_dir /mnt/log/mysql mysql:mysql
